<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>添加菜单</title>
  <link href="__PUBLIC__/css/admin/reset.css" rel="stylesheet" type="text/css">
  <link href="__PUBLIC__/css/admin/zh-cn-system.css" rel="stylesheet" type="text/css">
  <link href="__PUBLIC__/css/admin/table_form.css" rel="stylesheet" type="text/css">
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles1.css" title="styles1" media="screen">
  <link rel="alternate stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles2.css" title="styles2" media="screen">
  <link rel="alternate stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles3.css" title="styles3" media="screen">
  <link rel="alternate stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles4.css" title="styles4" media="screen">
  <script type="text/javascript" src="__PUBLIC__/js/admin/jquery.min.js"></script>
  <script type="text/javascript" src="__PUBLIC__/js/admin/jquery.cookie.js"></script>
  <script type="text/javascript" src="__PUBLIC__/js/admin/styleswitch.js"></script>
  <script type="text/javascript" src="__PUBLIC__/js/admin/admin_common.js"></script>
  <script src="__PUBLIC__/js/admin/jquery.artDialog.source.js?skin=default"></script>
  <script src="__PUBLIC__/js/admin/plugins/iframeTools.source.js"></script>
  <script language="javascript" type="text/javascript" src="__PUBLIC__/js/admin/formvalidator.js" charset="UTF-8"></script>
  <script language="javascript" type="text/javascript" src="__PUBLIC__/js/admin/formvalidatorregex.js" charset="UTF-8"></script>
</head>
<body>
  <div class="subnav">
    <div class="content-menu ib-a blue line-x">
      <a class="add fb" href="__MODULE__/Menu/add"><em>添加菜单</em></a>　    <a href="__MODULE__/Menu/index"><em>菜单管理</em></a>
    </div>
  </div>
  <div class="pad-lr-10">
    <form name="myform" id="myform" action="__MODULE__/Menu/add" method="post">
      <table cellpadding=0 cellspacing=0 class="table_form" width="100%">
        <tr>
          <td width="10%" align="right">是否需要判断请求方式:</td>
          <td width="90%">
            <label style="float:left;width:75px">
              <input type="radio" class="input_radio " name="info[request_method]" checked value="0"> 否
            </label>
            <label style="float:left;width:75px">
              <input type="radio" class="input_radio " name="info[request_method]"  value="1" > 是
            </label>
          </td>
        </tr>
        <tr>
          <td width="10%" align="right">上级菜单:</td>
          <td width="90%">
            <select id="pid" name="info[pid]">
              <option value="0" <?php if (!isset($_GET['menu_id']) || $_GET['menu_id'] == 0){echo "selected";} ?>>顶级菜单</option>
              <?php foreach ($menus as $key => $menu) { ?>
              <option value="<?php echo $menu['id']; ?>" <?php if (isset($_GET['menu_id']) && $_GET['menu_id'] == $menu['id']){echo "selected";} ?>><?php echo cat_empty_deal($menu, $menu[$key+1]['pid'], 'pid', "&nbsp;&nbsp;&nbsp;").$menu['title']; ?></option>
              <?php } ?>
            </select>
          </td>
        </tr>
        <tr>
          <td width="10%" align="right">菜单名:</td>
          <td width="90%">
            <input type="text" class="input-text" name="info[title]" id="title" value="" size="40"/>
          </td>
        </tr>
        <tr>
          <td width="10%" align="right">模块名:</td>
          <td width="90%">
            <input type="text" class="input-text " name="info[module]" id="module" value="" size="40"/>
            <span id="for_module" ></span>
          </td>
        </tr>
        <tr>
          <td width="10%" align="right">方法名:</td>
          <td width="90%">
            <input type="text" class="input-text " name="info[action]" id="action" value="" size="40"/>
          </td>
        </tr>
        <tr>
          <td width="10%" align="right">URL附加参数:</td>
          <td width="90%">
            <input type="text" class="input-text" name="info[params]" value="" size="40"/>
          </td>
        </tr>
        <tr>
          <td width="10%" align="right">排序:</td>
          <td width="90%">
            <input type="text" class="input-text" name="info[sort]" value="0" size="40"/>
          </td>
        </tr>
        <tr>
          <td width="10%" align="right">状态:</td>
          <td width="90%">
            <label style="float:left;width:75px">
              <input type="radio" class="input_radio " name="info[status]" id="status_1" checked value="1"> 启用
            </label>
            <label style="float:left;width:75px">
              <input type="radio" class="input_radio " name="info[status]" id="status_2"  value="0" > 禁用
            </label>
          </td>
        </tr>
        <tr>
          <td width="10%" align="right">描述:</td>
          <td width="90%"><textarea name="info[remark]" rows="3" cols="60" id="remark"/></textarea>
          </td>
        </tr>
      </table>
      <div class="bk15"></div>
      <div class="btn">
        <input type="submit" name="dosubmit" id="dosubmit" value="提交" class='button'>&nbsp;<input type="reset" value="重置" class='button'>
      </div>
    </form>
  </div>

  <script type="text/javascript">
  $(function(){
    $.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'}, function(){this.close();$(obj).focus();})}});
    $("#title").formValidator({onshow:"请输入对应的中文语言名称",onfocus:"请输入对应的中文语言名称",oncorrect:"输入正确"}).inputValidator({min:1,onerror:"请输入对应的中文语言名称"});
    $("#module").formValidator({onshow:"请输入模块名",onfocus:"请输入模块名",oncorrect:"输入正确"}).inputValidator({min:1,onerror:"请输入模块名"});
    $("#action").formValidator({tipid:'a_tip',onshow:"请输入方法名",onfocus:"请输入方法名",oncorrect:"输入正确"}).inputValidator({min:1,onerror:"请输入方法名"});
  });
  </script>
</body>
</html>